<form id="send-form" class="form-horizontal nice-validator n-default n-bootstrap" role="form" data-toggle="validator" method="POST" action="16514" novalidate="novalidate">

    <fieldset>
        <legend>
            订单信息 
        </legend>

        <!-- 订单信息 -->
        <div class="col-md-10 col-md-offset-1 col-sm-12">
            <div class="box radius-none">
                <div class="box-header with-border">
                    订单编号：{$data.order_no} ( 下单时间 {$data.createtime|date="y-m-d H:i:s",###})
                </div>
                <div class="box-body">
                    <div class="panel panel-default">
                      <div class="panel-heading">商品详情</div>
                      <table class="table">
                        <tbody>
                            {if condition="isset($data.goods_list)"}

                                {volist name="data.goods_list" id="vo"}
                                    <tr>
                                        <td>{$vo.goods_name}</td>
                                        <td>{$vo.goods_attr}</td>
                                        <td>单价:{$vo.unit_price}</td>
                                        <td>数量:{$vo.num}</td>
                                    </tr>
                                {/volist}

                            {else/}

                            <tr>
                              <td>{$data.goods_name}</td>
                              <td>{$data.goods_attr}</td>
                              <td>单价:{$data.unit_price}</td>
                              <td>数量:{$data.num}</td>
                            </tr>
                            
                            {/if}
                        </tbody>
                    </table>

                    </div>

                    <div class="row" style="margin:1em 0;">
                        <div class="col-md-4 padding">
                            <span class="label label-danger">支付状态</span> : 
                            {if condition="$data.pay_status eq '10'"}
                                未支付
                            {else/}
                                已支付
                            {/if}  
                        </div>
                        <div class="col-md-4 padding">
                            <span class="label label-danger">支付时间</span> : {if condition="($data.pay_time) neq '0'"}{$data.pay_time|date="Y-m-d H:i:s",###}{/if}</div>
                        <div class="col-md-4 padding">
                            <span class="label label-danger">总金额</span> : {$data.total_price} </div>
                    </div>

                    <div class="row" style="margin:1em 0;">

                        <div class="col-md-4 padding">
                            <span class="label label-success">发货时间</span> :  {if condition="isset($data.delivery_time)"}{$data.delivery_time|date="Y-m-d H:i:s",###}{/if}
                        </div>
                        <div class="col-md-4 padding">
                            <span class="label label-success">快递公司</span> : {$data.company}
                        </div>
                        <div class="col-md-4 padding">
                            <span class="label label-success">快递单号</span> : {$data.track_number}
                        </div>

                    </div>

                    <div class="row" style="margin:1em 0;">
                    
                        <div class="col-md-4 padding">
                            <span class="label label-info">订单状态</span> :
                            <!-- 订单状态:10=未支付,20=已支付待发货,30=已发货,40=确认收货 -->
                                {switch name="data.order_status"}
                                    {case value="10"}未支付{/case}
                                    {case value="20"}已支付待发货{/case}
                                    {case value="30"}已发货{/case}
                                    {case value="40"}确认收货{/case}
                                    {default /}已还机
                                {/switch}
                        </div>
                    </div>

                    <div class="col-md-12 padding">
                        <fieldset>
                            <legend><h4>收货人信息</h4></legend>
                            <div class="col-md-6 padding">
                                省 / 市 / 区: {$data.address.province} / {$data.address.city} / {$data.address.region}                           </div>
                            <div class="col-md-6 padding">
                                具体地址: {$data.address.detail}                          </div>
                            <div class="col-md-6 padding">
                                联系人:{$data.address.name}                          </div>
                            <div class="col-md-6 padding">
                                联系电话: {$data.address.phone}                           </div>
                        </fieldset>
                    </div>

                </div>
            </div>
        </div>

    

        <!-- 订单信息 -->
    </fieldset>

    {if condition="$data.rent neq ''"}

    <fieldset>
        <legend><h4>还机</h4></legend>

        <div class="col-md-4 padding">
            <div class="col-md-4 padding">
                <span class="label label-success">身份证正面:</span>
            </div>
            {if condition="$data.front_id_img neq ''"}
            <div class="col-md-4 padding">
                <img style="width: 78px;" data-tips-image src="{$data.front_id_img}">
            </div>
            {else/}
                无
            {/if}
        </div>
        <div class="col-md-4 padding">
            <div class="col-md-4 padding">
                <span class="label label-success">身份证背面:</span>
            </div>
            {if condition="$data.back_id_img neq ''"}
            <div class="col-md-4 padding">
                <img style="width: 78px;" data-tips-image src="{$data.back_id_img}">
            </div>
            {else/}
                无
            {/if}
            
        </div>

        <div class="col-md-4 padding">
            <div class="col-md-4 padding">
                <span class="label label-success">学生证照片:</span>
            </div>
            {if condition="$data.student_img neq ''"}
                <div class="col-md-4 padding">
                    <img style="width: 78px;" data-tips-image src="{$data.student_img}" alt="">
                </div>
            {else/}
                无
            {/if}
            
            
        </div>

        <div class="col-md-12 padding">
            <fieldset>
                <legend><h4>还机操作</h4></legend>

                <div class="col-md-4 padding">
                    <span class="label label-success">还机时间</span> :  {if condition="isset($data.huanji_time)"}{$data.huanji_time|date="Y-m-d H:i:s",###}{/if}
                </div>

                {if condition="$data.huanji_time eq ''"}
                <div class="col-md-4 padding">
                    <span class="label label-success">是否还机</span> :  
                    <div class="radio">
                        <label for="row[status]-normal"><input id="row[status]-normal" name="row[order_status]" type="radio" value="{$data.order_status}" checked=""> 未还机</label> 
                        
                        <label for="row[status]-hidden"><input id="row[status]-hidden" name="row[order_status]" type="radio" value="50"> 已还机</label> 
                    </div>
                </div>

            </fieldset>
        </div>
        
            
        {/if}

    </fieldset>
    {/if}

    <fieldset>
        <legend><h4>发货信息</h4></legend>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">快递公司:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-company" class="form-control" name="row[company]" type="text" value="{$data.company}">
                    <input type="hidden" name="row[id]" value="{$order_id}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">快递单号:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-track_number" class="form-control" name="row[track_number]" type="text" value="{$data.track_number}">
                </div>
            </div>
    </fieldset>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button onclick="on_sub(true);" class="btn btn-success">取消咨询</button>
            <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>

        <script>
            var on_sub = function (on) {
                var url = on ? 'Consult/cancel' : 'Consult/refund';
                url = url + '?ids={:input("ids")}';
                console.log(url);return false;
                $('#send-form').attr('action',url);
            }
        </script>

    </div>
</form>